<?php
//开发环境
$params = array_merge(
	require (__DIR__ . '/../../common/config/params.php'),
	require (__DIR__ . '/../../common/config/params-local.php'),
	require (__DIR__ . '/params.php'),
	require (__DIR__ . '/params-local.php')
);

return [
	'id' => 'coreapi',
	'defaultRoute' => 'main/index',
	'basePath' => dirname(__DIR__),
	'bootstrap' => ['log'],
	'controllerNamespace' => 'coreapi\controllers',
	'modules' => [
		'api' => [
			'class' => 'coreapi\modules\API',
		],
	],
	'components' => [
		'user' => [
			'identityClass' => 'common\models\User',
			'enableAutoLogin' => true,
		],
		'log' => [
			'targets' => [
				[
					'class' => 'yii\log\FileTarget',
					'levels' => ['info', 'trace', 'error', 'warning'],
				],
			],
		],
		'errorHandler' => [
			'errorAction' => 'main/error',
			//'class' => 'coreapi\extensions\exception\CoreAPIErrorHandler',
		],
		'rong' => [
			'class' => 'coreapi\extensions\rong\RongCloud',
			'appKey' => 'bmdehs6pb1els',
			'appSecret' => 'NYYRK5kfM7z',
		],
		'urlManager' => [
			'enablePrettyUrl' => true,
			'showScriptName' => false,
			//'suffix' => '.html',
			'rules' => [

			],
		],
	],
	'params' => $params,
];
